﻿using furion.blog.Domain.Shared.Enum;
using furion.blog.Domain.Shared.ValidateAttribute;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace furion.blog.Domain.Shared.Dto.TagConfig
{
    public class TagConfigCreateDto
    {
        [Required(ErrorMessage = "请填写标签")]
        [JsonProperty(PropertyName = "tagLabel")]
        public string TagLabel { get; set; }

        [JsonProperty(PropertyName = "tagKey")]
        public string TagKey { get; set; }

        [JsonProperty(PropertyName = "groupKey")]
        [Required(ErrorMessage = "请选择类型")]
        [ValuesValidateAttribute(StrValues = new string[] { "System","House", "Job", "HouseKeepingSkill" } , ErrorMessage = "类型有误")]
        public string GroupKey { get; set; }

        [JsonProperty(PropertyName = "status")]
        [ValuesValidateAttribute(StrValues = new string[] { "Normal", "Disable" },ErrorMessage = "状态有误")]
        [Required(ErrorMessage ="请选择状态")]
        public string Status { get; set; }

        [JsonProperty(PropertyName = "icon")]
        [Required(ErrorMessage = "请上传图标")]
        public string Icon { get; set; } = string.Empty;

        public string IsDelete { get; set; } = YesOrNoEnum.No.ToString();
        public long CreatedBy { get; set; }
        public long UpdatedBy { get; set; }
        public DateTime CreatedTime { get; set; }
        public DateTime UpdatedTime { get; set; }

    }
}
